using System;
using System.ComponentModel;
using System.Drawing;
using ZO.SmartCore.Windows.Forms.Design;

namespace ZO.SmartCore.Windows.Forms
{
    /// <summary>
    /// Information Container Control used to display information about startup or finish operation.
    /// </summary>
    [Designer(typeof(SmartInfoContainerDesigner))]
    [ToolboxBitmap(typeof(SmartInfoContainer), "SmartCore.Windows.Forms.SmartInfoContainer.bmp")]
    [ToolboxItem(true)]
    public partial class SmartInfoContainer : SmartUserControl
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SmartInfoContainer"/> class.
        /// </summary>
        public SmartInfoContainer()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Get/Set the title for the info page
        /// </summary>
        [Category("Appearance")]
        [DefaultValue("Welcome to the / Completing the <Title> Wizard")]
        public string PageTitle
        {
            get
            {
                return TitleLabel.Text;
            }
            set
            {
                TitleLabel.Text = value;
            }
        }

        /// <summary>
        /// Get/Set the title for the info page
        /// </summary>
        [Category("Description")]
        [DefaultValue("This wizard enables you to...")]
        public string Description
        {
            get
            {
                return DescriptionLabel.Text;
            }
            set
            {
                DescriptionLabel.Text = value;

                DescriptionLabel.Visible = String.IsNullOrEmpty(value) ? false : true;
            }

        }

        /// <summary>
        /// Gets/Sets the Icon
        /// </summary>
        [Category("Appearance")]
        public Image Logo
        {
            get
            {
                return LogoPictureBox.Image;
            }
            set
            {
                LogoPictureBox.Image = value;
            }
        }


        /// <summary>
        /// Shoulds the serialize logo.
        /// </summary>
        /// <returns></returns>
        private bool ShouldSerializeLogo()
        {
            return LogoPictureBox.Image != ((Image)(resources.GetObject("LogoPictureBox.Image")));
        }

        /// <summary>
        /// Resets the logo.
        /// </summary>
        private void ResetLogo()
        {
            LogoPictureBox.Image = ((Image)(resources.GetObject("LogoPictureBox.Image")));
        }
    }
}

